package org.spring.boot.fusion.demo.controller;

import java.util.Date;

import org.spring.boot.fusion.common.annotation.NotLoginAuth;
import org.spring.boot.fusion.common.aop.MethodsParameterBean;
import org.spring.boot.fusion.common.response.ResponseData;
import org.spring.boot.fusion.common.tools.ThreadLocalTool;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

	@GetMapping(value = "test",name = "测试方法")
	public ResponseData test(String name) {
		MethodsParameterBean methodsParameterBean = ThreadLocalTool.getMethodsParameterBean();
		return ResponseData.SUCCESS(methodsParameterBean);
	}
	
	@GetMapping("test2")
	public ResponseData test2() {
		MethodsParameterBean methodsParameterBean = ThreadLocalTool.getMethodsParameterBean();
		return ResponseData.SUCCESS(methodsParameterBean);
	}
	
	@NotLoginAuth
	@GetMapping("test1")
	public ResponseData test1() {
		return ResponseData.SUCCESS(new Date());
	}
}
